﻿using System.Windows;

namespace AiMoWindows.Windows.Scripts.ViewModels
{
    class ScriptUIViewModel(Window owner) : UIViewModelBase(owner)
    {
        bool _CompileOnly = false;
        public bool CompileOnly
        {
            set
            {
                _CompileOnly = value;
                RaisePropertyChanged(nameof(RunButtonText));
            }
        }
        bool _Readonly = false;
        public bool Readonly
        {
            set
            {
                _Readonly = value;
                RaisePropertyChanged(nameof(RunButtonText));
            }
        }
        public string CommandLibraryButtonText => IsEnglish ? "Command Library" : "命令库";
        public string RunButtonText =>
            _Readonly ? (IsEnglish ?
                "Readonly" : "只读模式") :
                (_CompileOnly ?
                    (IsEnglish ? "Compile Dll" : "编译 Dll") :
                    (IsEnglish ? "Run" : "运行代码")
                );
        public string AiAssistantButtonText => IsEnglish ? "Ai Assistant" : "Ai助手";
        public string OpenPathToolTip => IsEnglish ? "Click to show current code file in folder." : "点击以在文件夹中显示当前代码文件";
    }
}
